/* 自定义配色变量 */
:root {
    /* 基础色彩 */
    --bg-primary: #E8F0FE;
    --bg-secondary: #F0F8FF;
    --bg-card: #FFFFFF;
    
    /* 强调色彩 */
    --accent-blue: #A7C7ED;
    --accent-purple: #D0BCE1;
    --accent-pink: #F4B6C2;
    
    /* 文本色彩 */
    --text-primary: #333333;
    --text-secondary: #6B7280;
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #8ab3e0;
}

/* 消息动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-enter {
    animation: slideUp 0.3s ease-out;
}

/* 思考动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.thinking-dot {
    animation: pulse 1.5s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Toast 通知动画 */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

.toast-enter {
    animation: slideInRight 0.3s ease-out;
}

.toast-exit {
    animation: slideOutRight 0.3s ease-in;
}

/* Modal 对话框动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-backdrop {
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s ease-out;
}

/* 文件上传区域拖拽状态 */
.upload-area-drag-over {
    border-color: var(--accent-blue) !important;
    border-style: solid !important;
    background-color: rgba(167, 199, 237, 0.1) !important;
}

/* 代码块样式 */
pre {
    background-color: #F3F4F6;
    border: 1px solid rgba(244, 182, 194, 0.5);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
}

code {
    color: var(--accent-pink);
    font-family: 'Courier New', Courier, monospace;
}

/* 加载动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* 按钮悬停效果 */
.btn-hover {
    transition: all 0.2s ease;
}

.btn-hover:hover {
    transform: translateY(-1px);
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 文件淡出动画 */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.file-exit {
    animation: fadeOut 0.3s ease-in;
}

/* Markdown 内容样式 */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.markdown-content p {
    margin-bottom: 1em;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.markdown-content li {
    margin-bottom: 0.25em;
}

.markdown-content blockquote {
    border-left: 4px solid var(--accent-purple);
    padding-left: 1em;
    margin: 1em 0;
    color: var(--text-secondary);
}

.markdown-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.markdown-content a:hover {
    color: #8ab3e0;
}

/* 响应式隐藏类 */
@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

@media (min-width: 769px) {
    .show-mobile {
        display: none;
    }
}

